import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [{
      path: '/',
      name: 'login',
      component: () => import('../views/login_new')
    },
    // {
    //     path: '/projectList',
    //     name: 'projectList',
    //     component: () =>
    //         import ('../views/projectList')
    // },
    {
      path: '/index',
      name: 'main',
      component: () => import('../views/main'),
      children: [{
          path: 'home',
          name: 'home',
          component: () => import('../views/home'),
          meta: {
            title: '前海市政BIM',
            index: 0,
            toast: true
          }
        },
        {
          path: 'projectList',
          name: 'projectList',
          component: () => import('../views/projectList1'),
          meta: {
            title: '项目',
            index: 1,
            toast: true
          }
        },
        {
          path: 'personal',
          name: 'personal',
          component: () => import('../views/personal'),
          meta: {
            title: '个人中心',
            index: 2,
            toast: true
          }
        },
        
        {
          path: 'my',
          name: 'my',
          component: () => import('../views/my')
        },
        {
          path: 'systemInfo',
          name: 'systemInfo',
          component: () => import('../views/systemInfo')
        }
      ]
    },
    {
      path: '/index/vote',
      name: 'vote',
      component: () => import('../views/vote')
    },
    {
      path: '/index/showPrize',
      name: 'showPrize',
      component: () => import('../views/showPrize')
    },
    {
      path: '/index/voteInfo1',
      name: 'voteInfo1',
      component: () => import('../views/voteInfo1')
    },
    {
      path: '/index/voteInfo2',
      name: 'voteInfo2',
      component: () => import('../views/voteInfo2')
    },
    {
      path: '/index/voteInfo3',
      name: 'voteInfo3',
      component: () => import('../views/voteInfo3')
    },
    {
      path: '/index/voteInfo4',
      name: 'voteInfo4',
      component: () => import('../views/voteInfo4')
    },
    {
      path: '/userBack',
      name: 'userBack',
      component: () => import('../views/userback/userBack')
    },
    {
      path: 'qrcode',
      name: 'qrcode',
      component: () => import('../views/qrcode')
    },
    {
      path: '/addressBook',
      name: 'addressBook',
      component: () => import('../views/addressBook/addressBook'),
      meta: {
        title: '通讯录',
        index: 1,
        toast: true
      },
      children: [{
        path: 'person',
        name: 'person',
        component: () => import('../views/addressBook/person'),
        meta: {
          title: '人员信息'
        }
      }]
    },
    // {
    //   path: '/task',
    //   name: 'taskList',
    //   component: () => import('../views/task/taskList'),
    //   children: [{
    //     path: 'info',
    //     name: 'taskInfo',
    //     component: () => import('../views/task/test'),
    //     children: [{
    //       path: 'photo',
    //       name: 'photoView',
    //       component: () => import('../views/common/photo')
    //     }]
    //   }]
    // },
    {
      path: '/task',
      name: 'taskList',
      component: () => import('../views/task/taskList'),
    },
    {
      path: '/info',
      name: 'taskInfo',
      component: () => import('../views/task/test'),
    },
    {
      path: '/offlinehidangerlist',
      name: 'offlinehidangerlist',
      component: () => import('../views/hidangereport/offlinehidangerlist'),
      children: []
    },
    {
      path: '/offlineCklist',
      name: 'offlineCklist',
      component: () => import('../views/dailyCheck/offlineCklist'),
      children: []
    },
    {
      path: '/hidangereport',
      name: 'hidangerlist',
      component: () => import('../views/hidangereport/hidangerlist'),
      children: []
    },
    {
      path: '/dailyCheck',
      name: 'checkList',
      component: () => import('../views/dailyCheck/checkList'),
      children: []
    },
    {
      path: '/proList',
      name: 'proList',
      component: () => import('../views/hidangereport/proList'),
      children: []
    },
    {
      path: '/proListR',
      name: 'proListR',
      component: () => import('../views/hidangereport/proListR'),
      children: []
    },
    {
      path: '/proListc',
      name: 'proListc',
      component: () => import('../views/dailyCheck/proListc'),
      children: []
    },
    {
      path: '/hidangereport/proListR1',
      name: 'proListR1',
      component: () => import('../views/hidangereport/proListR1'),
      children: []
    },
    {
      path: '/hidangereport/proList1',
      name: 'proList1',
      component: () => import('../views/hidangereport/proList1'),
      children: []
    },
    {
      path: '/dailyCheck/proListc1',
      name: 'proListc1',
      component: () => import('../views/dailyCheck/proListc1'),
      children: []
    },
    {
      path: '/hidangereport/InspectionInfo1',
      name: 'InspectionInfo1',
      component: () => import('../views/hidangereport/InspectionInfo1'),
      children: []
    },
    {
      path: '/hidangereport/offlineInspDetail',
      name: 'offlineInspDetail',
      component: () => import('../views/hidangereport/offlineInspectionDetail'),
      children: []
    },
    {
      path: '/hidangereport/rectifyInfo1',
      name: 'rectifyInfo1',
      component: () => import('../views/hidangereport/rectifyInfo1'),
      children: []
    },
    {
      path: '/hidangereport/InspectionInfo',
      name: 'InspectionInfo',
      component: () => import('../views/hidangereport/InspectionInfo'),
      children: []
    },
    {
      path: '/hidangereport/rectifyInfo',
      name: 'rectifyInfo',
      component: () => import('../views/hidangereport/rectifyInfo'),
      children: []
    },
    {
      path: '/dailyCheck/checkInfo',
      name: 'checkInfo',
      component: () => import('../views/dailyCheck/checkInfo'),
      children: []
    },
    {
      path: '/quality',
      name: 'qualityList',
      component: () => import('../views/quality/qualityList'),
      children: [{
        path: 'quaInfo',
        name: 'qualityInfo',
        component: () => import('../views/quality/qualityInfo')
      }]
    },
    {
      path: '/health',
      name: 'health',
      component: () => import('../views/healthinfo')
    },
    {
      path: '/hazard',
      name: 'hazardList',
      component: () => import('../views/hazard/hazardlist'),
      children: [{
        path: 'hazardinfo',
        name: 'hazardInfo',
        component: () => import('../views/hazard/hazardinfo')
      }]
    },
    {
      path: '/dailyCheck/checkInfo1',
      name: 'checkInfo1',
      component: () => import('../views/dailyCheck/checkInfo1'),
      children: []
    },
    {
      path: '/projectDisplay',
      name: 'projectDisplay',
      component: () => import('../views/projectDisplay/projectDisplay')
    },
    {
      path: '/projectDisplay/projectPic',
      name: 'projectPic',
      component: () => import('../views/projectDisplay/projectPic')
    },
    {
      path: '/projectDisplay/projectVideo',
      name: 'projectVideo',
      component: () => import('../views/projectDisplay/projectVideo')
    },
    {
      path: '/projectDisplay/projectOverView',
      name: 'projectOverView',
      component: () => import('../views/projectDisplay/projectOverView')
    },
    {
      path: '/attendance',
      name: 'attendance',
      component: () => import('../views/attendance/attendance')
    },
    {
      path: '/design',
      name: 'design',
      component: () => import('../views/design/design')
    },
    {
      path: '/design/pic',
      name: 'picUpload',
      component: () => import('../views/design/picUpload')
    },
    {
      path: '/design/sheet',
      name: 'sheetUpload',
      component: () => import('../views/design/sheetUpload')
    },
    {
      path: '/projectDisplay/projectPic/projectPic_detail',
      name: 'projectPicDetail',
      component: () => import('../views/projectDisplay/projectPicDetail')
    },
    {
      path: '/projectDisplay/projectVideo/projectVideo_detail',
      name: 'projectVideoDetail',
      component: () => import('../views/projectDisplay/projectVideoDetail')
    },
    {
      path: '/newsNotice',
      name: 'nnList',
      component: () => import('../views/newsNotice/nnList'),
      children: [{
        path: 'nnInfo',
        name: 'nnInfo',
        component: () => import('../views/newsNotice/nnInfo')
      }]
    },

    //模型展示路由
    {
      path: '/bimInfo',
      name: 'bimInfo',
      component: () =>
        import('../views/bim/bimInfo')
    },
    {
      path: '/publicInfo',
      name: 'publicInfo',
      component: () => import('../views/publicInfo/publicInfo')
    },
    {
      path: '/publicInfo/publicDetailInfo',
      name: 'publicDetailInfo',
      component: () => import('../views/publicInfo/publicDetailInfo')
    },
    {
      path: '/publicInfo/fileInfo',
      name: 'noticeFileInfo',
      component: () => import('../views/publicInfo/fileInfo')
    },
    {
      path: '/publicInfo/folderDetail',
      name: 'folderDetail',
      component: () => import('../views/publicInfo/folderDetail')
    },
    {
      path: 'systemDetailInfo',
      name: 'systemDetailInfo',
      component: () => import('../views/systemDetailInfo')
    },
    {
      path: 'userBackDetailInfo',
      name: 'userBackDetailInfo',
      component: () => import('../views/userback/userBackDetailInfo')
    },
    {
      path: '/startUserBack',
      name: 'startUserBack',
      component: () => import('../views/userback/startUserBack')
    },
    {
      path: '/safetyMeetingInfo',
      name: 'safetyMeetingInfo',
      component: () => import('../views/safetyEducation/safetyMeetingInfo')
    },
    {
      path: '/safetyMeetingInfo1',
      name: 'safetyMeetingInfo1',
      component: () => import('../views/safetyEducation/safetyMeetingInfo1')
    },
    {
      path: '/safetyMeetingList',
      name: 'safetyMeetingList',
      component: () => import('../views/safetyEducation/safetyMeetingList')
    },
    {
      path: '/addressBook/personInfo',
      name: 'personInfo',
      component: () => import('../views/addressBook/personInfo')
    },
    {
      path: '/projectInfo/projectInfo',
      name: 'projectInfo',
      component: () => import('../views/projectInfo/projectInfo'),
      // meta:{
      //   keepAlive:true
      // }
    }, //从这里开始是质量检查模块的路由信息--------------------------------------------------------------------------------------------------------------------------------------------
    {
      path: '/qualityReport', //质量检查单的列表视图路由
      name: 'qualityReport',
      component: () => import('../views/qualityReport/hidangerlist')
    },
    {
      path: '/offlinequalitylist', //离线质量检查单的列表视图路由
      name: 'offlinequalitylist',
      component: () => import('../views/qualityReport/offlinequalitylist')
    },
    {
      path: '/qualityReport/offlineQualityDetail',
      name: 'offlineQualityDetail',
      component: () => import('../views/qualityReport/offlineQualityDetail')
    },
    {
      path: '/dailyCheck/offlinechecklistdetial',
      name: 'offlinechecklistdetial',
      component: () => import('../views/dailyCheck/offlinechecklistdetial')
    },
    {
      path: '/qualityReport/InspectionInfo1', //质量检查单查看页面
      name: 'qualityInspectionInfo1',
      component: () => import('../views/qualityReport/InspectionInfo1')
    },
    {
      path: '/qualityReport/InspectionInfo', //质量检查单的填报页面
      name: 'qualityInspectionInfo',
      component: () => import('../views/qualityReport/InspectionInfo')
    },
    {
      path: '/prjList',
      name: 'prjList',
      component: () => import('../views/qualityReport/prjList'),
      children: []
    },
    {
      path: '/qualityReport/prjList1',
      name: 'prjList1',
      component: () => import('../views/qualityReport/prjList1'),
      children: []
    },
    {
      path: '/downLoad',
      name: 'downLoad',
      component: () => import('../components/downLoadPage/index'),
      children: []
    },
    {
      path: '/prjListR',
      name: 'projListR',
      component: () => import('../views/qualityReport/proListR'),
      children: []
    },
    {
      path: '/prjListS',
      name: 'prjListS',
      component: () => import('../views/safetyEducation/prjListS'),
      children: []
    },
    {
      path: '/prjListS1',
      name: 'prjListS1',
      component: () => import('../views/safetyEducation/prjListS1'),
      children: []
    },
    {
      path: '/qualityReport/proListR1',
      name: 'qualityproListR1',
      component: () => import('../views/qualityReport/proListR1'),
      children: []
    }, {
      path: '/qualityReport/rectifyInfo1',
      name: 'qualityrectifyInfo1',
      component: () => import('../views/qualityReport/rectifyInfo1'),
      children: []
    },
    {
      path: '/qualityReport/rectifyInfo',
      name: 'qualityrectifyInfo',
      component: () => import('../views/qualityReport/rectifyInfo'),
      children: []
    },
    // 质量检查单路由结束分割线---------------------------------------------------------------------------------------------------------------------------------------------------
    //现场信息路由开始--------------------------------------------------------------------------------------
    {
      path: '/map',
      name: 'map',
      component: () => import('../views/leaflet/mapIndex')
    },
    {
      path: '/dangerList',
      name: 'dangerList',
      component: () => import('../views/leaflet/dangerList'),
      // meta:{
      //   keepAlive:true
      // }
    },
    {
      path: '/dangerDetail',
      name: 'dangerDetail',
      component: () => import('../views/leaflet/dangerDetail')
    },
    {
      path: '/qualityLists',
      name: 'qualityLists',
      component: () => import('../views/leaflet/qualityList'),
      // meta:{
      //   keepAlive:true
      // }
    },
    {
      path: '/qualityDetails',
      name: 'qualityDetails',
      component: () => import('../views/leaflet/qualityDetail')
    },
    {
      path: '/personList',
      name: 'personList',
      component: () => import('../views/leaflet/personList')
    },
    {
      path: '/personOnDuty',
      name: 'personOnDuty',
      component: () => import('../views/leaflet/personOnDuty')
    },
    //值班打卡路由---------------------------------------------
    {
      path: '/dutyCard',
      name: 'dutyCard',
      component: () => import('../views/dutycard/dutyCard')
    },
    //天气路由
    {
      path: '/weather',
      name: 'weather',
      component: () => import('../views/weather')
    },
    //安全监测
    {
      path:'/safetyMonitor',
      name: 'safetyMonitor',
      component:() => import('../views/safetyMonitoring/safetyMonitoringList.vue')
    },
    //新安全检查
    {
      path: '/hidangereport_new',
      name: 'hidangerlist',
      component: () => import('../views/hidangereport/hidangerInfo'),
      children: []
    },
    // 安全统计 2020/9/8 -- code by luthor 
    {
      path:'/safetyStatistics',
      name: 'safetyStatistics',
      component:() => import('../views/safetyStatistics')
    },
  ]
})
